#!/bin/bash

VERSION_TXT_FILE=webapp_version.txt

webpack --display-error-details

cd dist

if [ ! -f "$VERSION_TXT_FILE" ]; then
echo 1 > ${VERSION_TXT_FILE}
else
VER=$(cat ${VERSION_TXT_FILE})
let VER="$VER+1"
echo ${VER} > ${VERSION_TXT_FILE}
fi


zip -r ../web.zip ./*
#rm -rf webapp_version.txt
cp ../web.zip ~/Documents/XCodeProjects/JiSuWoNiu/JiSuWoNiu/Resources
rm -rf ../web.zip

